import request from '@/utils/request'

export default {
  jigList(params) {
    return request({
      url: '/v1/jigList',
      method: 'get',
      params
    })
  },
  getOne(id) {
    return request({
      url: `/v1/jig/${id}`,
      method: 'get'
    })
  },
  create(data) {
    return request({
      url: '/v1/jigAdd',
      method: 'post',
      data
    })
  },
  update(data) {
    return request({
      url: '/v1/jigUpdate',
      method: 'post',
      data
    })
  },
  delete(id) {
    return request({
      url: `/v1/jigDel/${id}`,
      method: 'get'
    })
  },
  renew(id) {
    return request({
      url: `/v1/jigRenew/${id}`,
      method: 'get'
    })
  },
  positionTree() {
    return request({
      url: '/v1/positionTree',
      method: 'get'
    })
  },
  excel(data) {
    return request({
      url: '/v1/jigExcel',
      method: 'post',
      data
    })
  }
}
